package org.lc.design.samples.case2;

import org.lc.design.samples.case1.strategy.AccessControlStrategy;

import java.util.Date;

/**
 * 出入口控制服务的另一种实现
 *
 * @author lc
 * @date 2024/7/5
 */
public class AlternativeAccessControlService {

    private AccessControlStrategy accessControlStrategy;

    public AlternativeAccessControlService(AccessControlStrategy accessControlStrategy) {
        this.accessControlStrategy = accessControlStrategy;
    }

    public void passThrough(String name, Date date) {
        this.accessControlStrategy.passThrough(name, date);
    }
}
